// 月卡管理相关接口
import request from '@/utils/request'
/**
 *
 *
 *
 */
export function getCardListAPI(params) {
  return request({
    url: '/parking/card/list',
    method: 'GET',
    params
  })
}

export function createCardAPI(data) {
  return request({
    url: '/parking/card',
    method: 'POST',
    data
  })
}

/**
 *  月卡 获取编辑页详情数据
 * @param id
 * @returns {*}
 */
export function getDetailAPI(id) {
  return request({
    url: `/parking/card/detail/${id}`,
    method: 'GET'
  })
}

/**
 *
 * 月卡 更新数据
 * @param card
 * @returns {*}
 */
export function updateCardAPI(card) {
  return request({
    url: `/parking/card/edit`,
    method: 'PUT',
    data: card
  })
}

/**
 *  删除月卡
 * @param id
 * @returns {*}
 */
export function delCardAPI(id) {
  return request({
    url: `/parking/card/${id}`,
    method: 'DELETE'
  })
}
/**
 *  批量删除月卡
 * @param ids
 * @returns {*}
 */
export function delBatchCardAPI(ids) {
  return request({
    url: `/parking/card/${ids.join(',')}`,
    method: 'DELETE'
  })
}
